import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/education/education_summary_three_level_entity.dart';

EducationSummaryThreeLevelEntity $EducationSummaryThreeLevelEntityFromJson(Map<String, dynamic> json) {
  final EducationSummaryThreeLevelEntity educationSummaryThreeLevelEntity = EducationSummaryThreeLevelEntity();
  final int? carRate = jsonConvert.convert<int>(json['carRate']);
  if (carRate != null) {
    educationSummaryThreeLevelEntity.carRate = carRate;
  }
  final int? classRate = jsonConvert.convert<int>(json['classRate']);
  if (classRate != null) {
    educationSummaryThreeLevelEntity.classRate = classRate;
  }
  final int? finishCount = jsonConvert.convert<int>(json['finishCount']);
  if (finishCount != null) {
    educationSummaryThreeLevelEntity.finishCount = finishCount;
  }
  final int? rate = jsonConvert.convert<int>(json['rate']);
  if (rate != null) {
    educationSummaryThreeLevelEntity.rate = rate;
  }
  final int? unFinishCount = jsonConvert.convert<int>(json['unFinishCount']);
  if (unFinishCount != null) {
    educationSummaryThreeLevelEntity.unFinishCount = unFinishCount;
  }
  return educationSummaryThreeLevelEntity;
}

Map<String, dynamic> $EducationSummaryThreeLevelEntityToJson(EducationSummaryThreeLevelEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['carRate'] = entity.carRate;
  data['classRate'] = entity.classRate;
  data['finishCount'] = entity.finishCount;
  data['rate'] = entity.rate;
  data['unFinishCount'] = entity.unFinishCount;
  return data;
}

extension EducationSummaryThreeLevelEntityExtension on EducationSummaryThreeLevelEntity {
  EducationSummaryThreeLevelEntity copyWith({
    int? carRate,
    int? classRate,
    int? finishCount,
    int? rate,
    int? unFinishCount,
  }) {
    return EducationSummaryThreeLevelEntity()
      ..carRate = carRate ?? this.carRate
      ..classRate = classRate ?? this.classRate
      ..finishCount = finishCount ?? this.finishCount
      ..rate = rate ?? this.rate
      ..unFinishCount = unFinishCount ?? this.unFinishCount;
  }
}
